home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / haeberli / mtex / lum.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  1KB  |  42 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. #ifndef LUMDEF
  18. #define LUMDEF
  19.  
  20. #define RLUM    (0.3086)
  21. #define GLUM    (0.6094)
  22. #define BLUM    (0.0820)
  23.  
  24. #define RINTLUM    (79)
  25. #define GINTLUM    (156)
  26. #define BINTLUM    (21)
  27.  
  28. #ifdef OLDWAY
  29. #define RLUM    (0.299)
  30. #define GLUM    (0.587)
  31. #define BLUM    (0.114)
  32.  
  33. #define RINTLUM    (77)
  34. #define GINTLUM    (150)
  35. #define BINTLUM    (29)
  36. #endif
  37.  
  38. #define ILUM(r,g,b)    ((RINTLUM*(r)+GINTLUM*(g)+BINTLUM*(b))>>8)
  39. #define LUM(r,g,b)    (RLUM*(r)+GLUM*(g)+BLUM*(b))
  40.  
  41. #endif
  42.